package com.kayden.ioc.controller;

import com.kayden.ioc.model.DbTypes;
import com.kayden.ioc.model.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

@Controller
public class YmlController {

    @Value("${my.key3}")
    private String myKey3;

    @Value("${my.key4}")
    private Integer myKey4;

    @Value("${person.id}")
    private Integer id;

//    @Value("${dbtypes.ball}")
//    private Map<String, String> ball;

    @Autowired
    private Person person;
    @Autowired
    private DbTypes dbTypes;

    @PostConstruct
    public void init(){
        System.out.println("id:"+ id);
        System.out.println("mykey3:"+ myKey3);
        System.out.println("mykey4:"+ myKey4);
        System.out.println("person: "+ person);
        System.out.println("dbTypes: "+ dbTypes);
//        System.out.println("ball: "+ ball);
    }
}
